class Base {
    constructor() {
        this.a = 1;
    }

    say(){
        console.log(this.a)
    }
}

class A extends Base{
    constructor() {
        super();
        this.a++;
    }

    work(){
        console.log(this.a);
    }
}

let a = new A();
a.say();
a.work();
console.dir(a)